package com.laoyu.common.db.handler.datasource;

public class DatasourceContextHandler {
  private static final ThreadLocal<String> context = new ThreadLocal<>();

  public static void setDatasourceRoutingKey(String routingKey) {
    context.set(routingKey);
  }

  public static String getRoutingKey() {
    return context.get();
  }

  public static void clear() {
    context.remove();
  }
}
